import java.util.LinkedHashMap;
import java.util.Scanner;

/**
 * 找出字符串中第一个只出现一次的字符
 */
public class OneWord {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            LinkedHashMap<Character, Integer> map = new LinkedHashMap<>();
            String str = scanner.nextLine();
            for (int i = 0; i < str.length(); i++) {
                char c = str.charAt(i);
                if (map.containsKey(c)) {
                    map.put(c, map.get(c) + 1);
                } else {
                    map.put(c, 1);
                }
            }
            boolean flag = true;
            for (Character key : map.keySet()) {
                if (map.get(key) == 1) {
                    System.out.println(key);
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.println(-1);
            }
        }
    }
}
